home *** CD-ROM | disk | FTP | other *** search
- property pSpr, pCenter, pRadius
-
- on beginSprite me
- pSpr = sprite(me.spriteNum)
- pCenter = pSpr.member.vertexList[1][#vertex]
- pCenter = sprite(me.spriteNum - 2).loc
- temp = pSpr.member.vertexList[2][#vertex]
- temp2 = temp - pCenter
- pRadius = 20
- pSpr.member.originMode = #point
- pSpr.member.strokeWidth = 4
- end
-
- on mUpdate me, percent
- if percent <= 0.25 then
- phase = 0
- else
- if (percent > 0.25) and (percent <= 0.5) then
- phase = PI / 2
- else
- if (percent > 0.5) and (percent <= 0.75) then
- phase = PI
- else
- if (percent > 0.75) and (percent <= 1.0) then
- phase = 3 * PI / 2
- end if
- end if
- end if
- end if
- theta = percent * 6.28319000000000027
- newVertex = point(pRadius * sin(theta + phase), pRadius * cos(theta + phase))
- pSpr.member.vertexList = [[#vertex: point(0, 0)], [#vertex: newVertex]]
- pSpr.member.regPoint = point(0, 0)
- pSpr.loc = pCenter
- end
-